﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;
using MockPrjTeam1.Biz;
using MockPrjTeam1.DAO;
using MockPrjTeam1.Entity;

namespace MockPrjTeam1.Biz
{
    public class FacilityBiz
    {
        public List<Facility> GetAll()
        {
            var dao = new FacilityDAO();
            return dao.GetAll();
        }
        public List<Facility> GetActive()
        {
            var dao = new FacilityDAO();
            return dao.GetActive();
        }
        public bool Save(Facility facility)
        {
            var dao = new FacilityDAO();
            return dao.Save(facility);
        }
        public Facility GetOne(int id)
        {
            var dao = new FacilityDAO();
            return dao.GetOne(id);
 
        }
        public bool CreateFacility(Facility Entity)
        {
            var dao = new FacilityDAO();
            var result = dao.CreateFacility(Entity);
            if (result)
                return true;
            else return false;
        }

        public bool EditFacility(Facility Entity)
        {
            var dao = new FacilityDAO();
            var result = dao.EditFacility(Entity);
            if (result)
                return true;
            else return false;
        }
        public List<Facility> Filter(int FilterID, int Active)
        {
            var dao = new FacilityDAO();
            return dao.Filter(FilterID, Active);


        }
    }
}